package cn.yym.test.service.impl;

import cn.yym.test.dao.PeopleDao;
import cn.yym.test.dao.impl.PeopleDaoImpl;
import cn.yym.test.domain.People;
import cn.yym.test.service.PeopleService;
import cn.yym.test.utils.PageBean;

import java.util.Date;

/**
 * @author admin
 */
public class PeopleServiceImpl implements PeopleService {

    private PeopleDao peopleDao = new PeopleDaoImpl();

    @Override
    public PageBean<People> getPageDate(String name, String gender, Date begin, Date end, int currentPage) {
        return peopleDao.getPageDate(name, gender, begin, end, currentPage);
    }

    @Override
    public void deletePeopleById(Integer id) {
        peopleDao.deletePeopleById(id);
    }

    @Override
    public People getPeopleById(Integer id) {
        return peopleDao.getPeopleById(id);
    }

    @Override
    public void editPeople(Integer id, String name, String gender, Date birthday, String email) {
            peopleDao.editPeople(id, name, gender, birthday, email);
    }
}
